//---------------------------------------------------------------------------

#ifndef SetFilterH
#define SetFilterH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <CheckLst.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#ifndef WklsH
  #include "Wkls.h"
#endif
//---------------------------------------------------------------------------
#if defined (__WKL_STATIC_USER)

class TKLS;
//---------------------------------------------------------------------------

class TCheckBoxInf
{
  public :
  bool checked;
  AnsiString Pon;

  public:

  TCheckBoxInf () {checked = false;Pon = "";}
//  TCheckBoxInf& operator = (const TCheckBoxInf& ch)  { Pon=ch.Pon; checked = ch.checked;
//                                                   return *this;
//                                                 }

//  TCheckBoxInf (const TCheckBoxInf &ch) {operator=(ch);} //*this = ch;}


  void __fastcall Clear()
   {
     checked = false;
     Pon = "";
   }
};
//---------------------------------------------------------------------------

typedef TrContainer <TCheckBoxInf *> TContCheckBox;
typedef TrPtrContainer <TContCheckBox> TContListCheckBox;

//---------------------------------------------------------------------------

struct TSprInfo
{
 uint Pos;
};

//---------------------------------------------------------------------------
class TFilterTabSheet : public TTabSheet
{
  public :
  TTreeView *TView;
  TCheckListBox *CheckListBox;
  TPanel *LeftPanel;
  TPanel *RightPanel;
  TContNameSprPos CSprPos;
  TTypeIE typeIE;
  TKLS *ParentKLS;
  TContListCheckBox ContCheckBox;
  __fastcall TFilterTabSheet(TComponent* Owner);
  void __fastcall TViewChange(TObject *Sender, TTreeNode *Node);
  void __fastcall TFilterTabSheet::CheckListBox1ClickCheck(TObject *Sender);
  void __fastcall FillCheckListBox(AnsiString PosName);
  void __fastcall Init(int tag);
};

//---------------------------------------------------------------------------

class TFilterPageControl : public TPageControl
{
  public :
  TFilterTabSheet *Page1,*Page2;

  __fastcall TFilterPageControl(TComponent* Owner);

};
//---------------------------------------------------------------------------
class TSetFilterForm : public TForm
{
__published:	// IDE-managed Components
        TPanel *BottomPanel;
        TPanel *TopPanel;
        TPanel *MainPanel;
        TButton *OkButton;
        void __fastcall FormShow(TObject *Sender);
        void __fastcall OkButtonClick(TObject *Sender);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
private:	// User declarations
public:		// User declarations
        TKLS  *ParentKLS;
        TFilterPageControl *TypeIEPageControl;
        short aplying;
        __fastcall TSetFilterForm(TComponent* Owner);
        virtual void  __fastcall Init(TKLS *pKLS);

        void __fastcall TSetFilterForm::GetSpravkaFilter();
};
//---------------------------------------------------------------------------
extern PACKAGE TSetFilterForm *SetFilterForm;
//---------------------------------------------------------------------------
#endif //  __WKL_STATIC_USER

#endif


